<?php

class FrontIndexAction extends Action  {
		
	public function main(){
		$this->_response['do']  = $this->_request['do'];
		//getting system setting
		$obj = new SystemSettingDAO();
		$Setting = $obj->getOneByID(1);

		foreach ($Setting as $key => $value) {
			$this->_response[$key] = $value;
		}

		//get class
		$obj = new ClassificationDAO();
		$classlist = $obj->getShowList('ClassDiaplayOrder');
		$showclass  = array();
		$obj2 = new ChannelInfoDAO();
		$j = 0;
		if ($classlist){
			foreach ($classlist as $key => $value) {
				$ChannelIDs = $value['ChannelID'];
				if ($ChannelIDs){
					$channellist = $obj2->getListByChannelID($ChannelIDs,'ChannelDisplayOrder');
					if ($channellist){
						$value['channellist'] = $channellist;
						$showclass [$j]  = $value;
						$j++;
					}
				}
			}
		}
		$this->_response['classlist'] = $showclass;

		//debug($showclass);
		

		//debug ($this->_response);
	}

}
?>